home *** CD-ROM | disk | FTP | other *** search
/ Flybox Trout (Edition 1) / Flybox Trout (Edition 1).iso / Setup / Support / FlyBox.exe / FlyBox.dxr / 00021.ls < prev    next >
Encoding:
Text File  |  2002-04-15  |  593 b   |  19 lines

  1. global DBPath
  2.  
  3. on exitFrame me
  4.   db = DGOpenDatabase(DBPath & "FlyBox.mdb", 0, 0, ";PWD=StopLooking")
  5.   a = getVariable(sprite(1), "Anecdote:a")
  6.   theString = getVariable(sprite(1), "Anecdote:Anecdote")
  7.   AnecdoteID = getVariable(sprite(1), "UAnecdoteID" & a)
  8.   num = length(theString)
  9.   repeat with i = 1 to num
  10.     if theString.char[i] = "'" then
  11.       NewString = NewString & "''"
  12.       next repeat
  13.     end if
  14.     NewString = NewString & theString.char[i]
  15.   end repeat
  16.   DGExecute("UPDATE Anecdote SET Anecdote = '" & NewString & "' WHERE AnecdoteID = " & AnecdoteID, db)
  17.   DGClose(db)
  18. end
  19.